#define _CRT_SECURE_NO_WARNINGS 1
#include<stdbool.h>
#include<string.h>
bool areAlmostEqual(char* s1, char* s2)
{
    if (strcmp(s1, s2) == 0)
        return true;
    int len = strlen(s1);
    if (len <= 1)
        return false;
    int i = 0;
    int num = 0;
    int c1 = 0;
    int c2 = 0;
    for (i = 0; i < len; i++)
    {
        if (s1[i] != s2[i])
        {
            num++;
            if (c1 == 0)
                c1 = i;
            else if (c2 == 0)
                c2 = i;
        }
    }
    if (num == 2)
    {
        char tmp = s1[c1];
        s1[c1] = s1[c2];
        s1[c2] = tmp;
        if (!strcmp(s1, s2))
            return true;
    }
    return false;
}

int main()
{
    char s1[100] = "siyolsdcjthwsiplccjbuceoxmpjgrauocx";
    char s2[100] = "siyolsdcjthwsiplccpbuceoxmjjgrauocx";
    bool c= areAlmostEqual(s1, s2);
    return 0;
}